package com.whmnx.chitchat.adapter.holder;

import android.graphics.Color;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.tencent.qcloud.tim.uikit.component.face.FaceManager;
import com.whmnx.chitchat.R;
import com.whmnx.chitchat.bean.ChatDetailsBean;
import com.whmnx.chitchat.fragment.ChatFragment;
import com.whmnx.chitchat.ui.chat.ChatActivity;
import com.whmnx.chitchat.utils.UItils;
import com.whmnx.chitchat.view.CustomPopWindow;

public class MessageTextHolder2 extends MessageContentHolder2 {

    private TextView msgBodyText;

    public MessageTextHolder2(View itemView) {
        super(itemView);
    }

    @Override
    public void layoutVariableViews(ChatDetailsBean msg, int position) {
        msgBodyText.setVisibility(View.VISIBLE);
        if (null != msg)
        FaceManager.handlerEmojiText(msgBodyText, msg.getChatRecord_Content());
        if (properties.getChatContextFontSize() != 0) {
            msgBodyText.setTextSize(properties.getChatContextFontSize());
        }
        if (msg.isSelf()) {
            msgBodyText.setTextColor(Color.WHITE);
           /* if (properties.getRightChatContentFontColor() != 0) {
            }*/
        } else {
            msgBodyText.setTextColor(Color.BLACK);
            if (properties.getLeftChatContentFontColor() != 0) {
                msgBodyText.setTextColor(properties.getLeftChatContentFontColor());
            }
        }
    }


    @Override
    public int getVariableLayout() {
        return com.tencent.qcloud.tim.uikit.R.layout.message_adapter_content_text;
    }

    @Override
    public void initVariableViews() {
        msgBodyText = rootView.findViewById(com.tencent.qcloud.tim.uikit.R.id.msg_body_tv);
    }
}
